package com.yellowpage.wf.service;

import java.util.List;
import java.util.Map;

import com.yellowpage.white.common.PageRender;
import com.yellowpage.white.service.BaseService;
import com.yellowpage.wf.data.Workflow;
import com.yellowpage.wf.data.WorkflowInstance;
import com.yellowpage.wf.data.WorkflowNode;
import com.yellowpage.wf.data.WorkflowPath;

public interface WorkflowService extends BaseService {

    /* White generate Method */
    public Workflow getWorkflow(Long id);
    public List<Workflow> getAllWorkflow();
    public List<Map> queryWorkflowByPage(Map queryMap, PageRender pageRender);
    public void saveWorkflow(Workflow workflow);
	public void updateWorkflow(Workflow workflow);
	public void delete(List deleteList);
	public List<Map> deleteWorkflow(List<Long> deleteIdsList); 
	public Map findNode(Long id);
	public List<Map> getNotUseWorkflow();
	public List<Workflow> getWorkflowForInstance();
	public Workflow getWorkflowByType(String type);
	public String getWorkflowTypeByWorkListId(String listId);
	
	public String isWorkflowUsed(Long workflowId);
	
	public void workflowCopy(Workflow originalWorkflow, Workflow dimWorkflow);
	
	public List<Map> getWorkflowNodes(Map queryMap);
	public void saveWorkflowNode(WorkflowNode workflowNode, Long preNodeId, Long afterNodeId);
	public List<Map> getWorkflowContext(Map queryMap);
	public List<Map> getWorkflowNodeContext(Map queryMap);
	
	public List<Map> getWorkflowInstanceByPage(Map queryMap, PageRender pageRender);	
	public void createWorkflowInstance(WorkflowInstance workflowInstance);
	
	public List<Map> getFromNodeList(Long workflowNodeId);
	public List<Map> getNextNodeList(Long workflowNodeId);
	
	public List<Map> getNodeInstanceList(Long workflowInstanceId);
	public void saveInstanceToNext(Long workflowInstanceId, Long workflowNodeId);
	
}


